<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<title>写博客</title>
	<link rel="stylesheet" href="css/editormd.css">
	<script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.js"></script>
	<script src="js/editormd.js"></script>
	<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
	<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
	<style>
		.fo-title-input{
			width: 100%;
			border: 0px;
			height: 48px;
			font-size: 1.5em;
			padding-left: 53px;
		}
		.fo-publish-btn{
			cursor: pointer;
		}
	</style>
</head>
<body>
<header>
	<div class="input-group">
		<input type="text" class="fo-title-input" placeholder="标题">
		<div class="input-group-addon fo-publish-btn" onclick="publish();">Publish Now!</div>
	</div>
</header>
	<div id="test-editor">
		<textarea style="display:none;">#### 开始你的创作!
</textarea>
	</div>

<script>
    var testEditor;
$(function() { 
     testEditor = editormd("test-editor", {
        width              : "90%",
        height             : 640,
        path               : "js/lib/",
        delay              : 1000,
    //    appendMarkdown     : md,
        codeFold           : true,
        saveHTMLToTextarea : true,
        searchReplace      : true,
        htmlDecode         : "style,script,iframe",
        emoji              : true,
        taskList           : true,
        tex                : true,
        flowChart          : true,
        sequenceDiagram    : true
		});

    testEditor.getMarkdown();       // 获取 Markdown 源码
    testEditor.getHTML();           // 获取 Textarea 保存的 HTML 源码
});
</script>
</body>
</html>